package com.ec.system.modules.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ec.system.modules.sys.dto.QueryMenuDTO;
import com.ec.system.modules.sys.entity.SysMenu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Eric Lee
 * @Description:
 * @time: 2021/8/7 20:50
 */
public interface SysMenuMapper extends BaseMapper<SysMenu> {
    List<SysMenu> queryRoleMenusOrButtons(@Param("roleIds") List<Long> roleIds, @Param("type") Integer type);

    int listMenuCount(QueryMenuDTO listMenuDTO);

    List<SysMenu> listMenu(QueryMenuDTO listMenuDTO);

    Integer deleteByMenuIdFromDb(@Param("menuId") Long menuId);

    List<SysMenu> queryRoleMenusOrButtonsByTypes(@Param("roleIds") List<Long> roleIds, @Param("types") List<Integer> types);
}
